package com.chushouya.product.dto.admin.product.evaluate;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
@ApiModel("评估选项模板")
public class TempEvaluateAddDTO {

    @ApiModelProperty(value = "类目id", required = true)
    @NotNull(message = "类目id不能为空")
    private Long categoryId;

    @ApiModelProperty(value = "模板名称", required = true)
    @NotBlank(message = "模板名称不能为空")
    private String tempName;

    @ApiModelProperty(value = "扣减规则", required = true)
    @NotNull(message = "扣减规则不能为空")
    private Integer calcType;

    @ApiModelProperty(value = "是否保存值", required = true)
    @NotNull(message = "是否保存值不能为空")
    private Boolean saveValue;

    @ApiModelProperty(value = "评估项目列表", required = true)
    @NotEmpty(message = "评估项目列表不能为空")
    private List<TempEvaluateItemAddDTO> items;

}
